package com.luli.controllor;

import com.luli.dao.UsersDao;
import com.luli.entity.Blood;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.util.List;

/**
 * 陆离
 * 2022/6/21 23:06:40
 */
@RestController
@Slf4j
@RequestMapping("/Blood")
@CrossOrigin
public class VueBloodController {

    @Autowired
    private UsersDao usersDao;

    //http://127.0.0.1:8086/LuLi/Blood/getBloodData
    @GetMapping("/getBloodData")
    public List<Blood> getBloodData() throws IOException {
        List<Blood> bloodData = usersDao.getBloodData();
        return bloodData;
    }
    @RequestMapping(method = RequestMethod.DELETE,value = "deleteBlood")
    public Integer deleteBloodData(String application){
        return usersDao.deleteBloodData(application);
    }
}
